//键盘接收年，月，日，判断该月有几天

#include <stdio.h>
int main(){
	int year = 0;
	int mouth = 0;
	int day = 0;
	int sum = 0;
	int i = 0;
	printf("输入年月日用空格隔开：");
	scanf("%d%d%d",&year,&mouth,&day);

	switch(mouth){
		case 1: 
		case 3: 
		case 5: 
		case 7:
		case 8: 
		case 10: 
		case 12: 
			printf("这个月有31天\n");
			break;
		case 4:
		case 6:
		case 9: 
		case 11:
			printf("这个月有30天\n"); 
			break;
		case 2:
			if(year % 4 == 0 && year % 100 != 0 || year % 400 == 0){
				printf("这个月有29天\n");
			} else { 
				printf("这个月有28天\n");
			}
			break;
		default:
			printf("Input error!\n"); 
			break;
	}


	return 0;
}
